<template>
	<!-- <view :style="this.baseConfig.isIOSshenhe?'display:none;height: 100%;':'height: 100%;'"> -->
	<view style='height: 100%;'>
		<tabControl :current="current" :values="items" bgc="#fff" :fixed="false" :scrollFlag='false' :isEqually='true'
			@clickItem="onClickItem" :temp="isshengji"></tabControl>
		<!-- 会员切换 -->
		<view class="huiyuan-wrapper">
			<view class="infor_quanyi" :style="this.pchuiyuan?'display:none;':'margin-top: 0;'">
				<view class="quanyi_title">
					<view class="quanyi_titleL">
						<view class="section-head-line"></view>选择业务地区范围<text style="color: #2e68e1;">（全国）</text>
					</view>
				</view>
				<view class="ywfw_cells">
					<view class="tagContainer">
						<view class="tagItem tagBgDefault" v-bind:key="index" v-for="(tagText,index) in AreaList">
							<text @tap="tapTag" :data-text="tagText">{{tagText}}</text>
							<text class="tagDelIcon" @tap="delTag" :data-text="tagText">×</text>
						</view>
					</view>
					<view class="ywfw_area add-sf" @click="addsf">
						添加省份
					</view>
				</view>
			</view>
			<view class="infor_quanyi" :style="this.pchuiyuan?'display:none;':''">
				<view class="quanyi_title">
					<view class="quanyi_titleL">
						<view class="section-head-line"></view>选择服务周期
					</view>
				</view>
				<view class="fwzq_cells">
					<view :class="[service.currcount==selectCount?'fwzq_list_selected':'']" class="fwzq_cell_list"
						v-for="(service,index) in services" :key="index" @tap="setSelectSpec(service)"
						:ref="[index==selectSpec?'fwzqselected':'']">
						<view class="fwzq_text1">{{service.Month}}</view>
						<view class="fwzq_jiage">￥<text>{{service.Discount}}</text></view>
						<view class="fwzq_jiage_fuben">{{service.Original}}</view>
						<view :class="[service.DiscountTag?'discount_icon2':'discount_icon']">{{service.Fold}}</view>
					</view>
				</view>
			</view>
			<view class="infor_quanyi" :style="youhuiquan.length>0?'':'display:none;'">
				<view class="quanyi_title">
					<view class="quanyi_titleL">
						<view class="section-head-line"></view>优惠券
					</view>
				</view>
				<template>
					<m-list-item :youhuiquan="youhuiquan" @Change="yhqradioChange" :currcount="selectCount"
						:Discount="Discount.toString()" :ordertype="ordertype" :isquanguo="isquanguo"
						:count="ordercount" :danweitype="danweitype" ref="yhqlistitem">
					</m-list-item>
				</template>
			</view>
			<view class="infor_quanyi" v-if="!isios||(isios&&!this.baseConfig.isIOSshenhe)"
				:style="yhqid>0?'display:none;':''">
				<view class="quanyi_title">
					<view class="quanyi_titleL">
						<view class="section-head-line"></view>邀请码
					</view>
				</view>
				<view
					style="display: flex; align-items: center; font-size: 32rpx; margin: 0 30rpx; padding-top: 30rpx;padding-bottom: 10rpx;">
					邀请码(选填)：<input type="text" placeholder="请输入邀请码"
						style="border: 1px solid #f5f5f5; flex: 1; margin-left: 20rpx; padding: 15rpx 20rpx; border-radius: 5px; font-size: 28rpx;"
						placeholder-style="font-size:28rpx" v-model="youhuima" @blur="CheckYaoqingma()" />
				</view>
			</view>
			<view v-if="!isios||(isios&&!this.baseConfig.isIOSshenhe)" class="infor_quanyi"
				:style="this.pchuiyuan?'margin-top: 0;':''">
				<view class="quanyi_title">
					<view class="quanyi_titleL">
						<view class="section-head-line"></view>支付方式
					</view>
				</view>
				<view class="payment">
					<radio-group @change="radioChange" class="payment_radio">
						<label class="pay-list-cell pay-list-cell-pd" v-for="(payment, index) in payments"
							:key="payment.value">
							<view>
								<image :src="payment.tupic" class="pay-tupic"></image>
								{{payment.name}}
							</view>
							<view style="margin-left: 20rpx;">
								<radio :value="payment.value" :checked="paymentItem.id == payment.value"
									:type="payment.value" color="#74df63" />
							</view>
						</label>
					</radio-group>
				</view>
			</view>

			<!-- <view v-else class="infor_quanyi" :style="this.pchuiyuan?'margin-top: 0;':''">
				<view class="quanyi_title" style="padding-top: 10rpx;padding-bottom: 10rpx;">
					<view class="" style="font-size: 26rpx; margin:6rpx auto ;">
						获取更低价格，请微信关注“采招网服务平台”公众号
					</view>
				</view>
			</view> -->
			<view class="infor_quanyi">
				<view class="quanyi_title">
					<view class="quanyi_titleL">
						<view class="section-head-line"></view>为您推荐
					</view>
				</view>
				<view class="payment recommend_pay">
					<view class="fwzq_cells">
						<view class="fwzq_cell_list" :class="[service.currcount==selectCount?'fwzq_list_selected':'']"
							v-for="(service,index) in recommend" :key="index" @tap="setSelectSpec(service)">
							<view class="fwqx_title">{{service.Month}}</view>
							<view class="fwzq_text1">{{service.renshu}}</view>
							<view class="fwzq_jiage">￥<text>{{service.Discount}}/年</text></view>
							<view class="fwzq_jiage_fuben">{{service.Original==''?'':'￥'+service.Original+'/年'}}</view>
							<view class="discount_icon">{{service.Fold}}</view>
						</view>
					</view>
					<view class="tequantishi">
						<image src="/static/img/huiyuan/tequan.png"></image>
						特权提示：
					</view>
					<view class="tequantishi_text">· 移动端会员：仅限服务号、手机版、APP移动端使用</view>
					<view class="tequantishi_text">· PC版付费用户：PC、服务号、手机版、APP移动端都可以使用</view>
				</view>
			</view>
		</view>
		<view class="huiyuan-wrapper">
			<view v-if="current === 0" class="tequan-box">
				<view class="infor_quanyi">
					<view class="quanyi_title">
						<view class="quanyi_titleL">
							<view class="section-head-line"></view>标准会员可享受<text
								style="color: #2e68e1; margin-left: 20rpx;"> 8大特权 </text>
						</view>
					</view>
					<view class="quanyi_cells">
						<view v-bind:class="[quanyi.isAllow ? 'quanyi_cell_list_on' : 'quanyi_cell_list', 'errorClass']"
							v-for="(quanyi,index) in quanyilists" :key='index'>
							<image :src="quanyi.qyimg" class="defult-img"></image>
							<image :src="quanyi.qyimgon" class="img-on"></image>
							<text>{{quanyi.qytitle}}</text>
						</view>
					</view>
				</view>
			</view>
			<view v-else class="tequan-box">
				<view class="infor_quanyi">
					<view class="quanyi_title">
						<view class="quanyi_titleL">
							<view class="section-head-line"></view>高级会员可享受<text
								style="color: #2e68e1; margin-left: 20rpx;"> 9大特权 </text>
						</view>
					</view>
					<view class="quanyi_cells">
						<view
							v-bind:class="[quanyi.isAllowgj ? 'quanyi_cell_list_on' : 'quanyi_cell_list', 'errorClass']"
							v-for="(quanyi,index) in quanyilists" :key='index'>
							<image :src="quanyi.qyimg" class="defult-img"></image>
							<image :src="quanyi.qyimgon" class="img-on"></image>
							<text>{{quanyi.qytitle}}</text>
						</view>
					</view>
				</view>
			</view>
			
		</view>
		
		<!-- 协议 -->
		<view class="huiyuan-wrapper" style="padding-bottom: 125rpx;">
			<view class="infor_quanyi">
				<view class="quanyi_title">
					<view class="quanyi_titleL">
						<view class="section-head-line"></view>服务协议
					</view>
				</view>
				<view class="fuwuxieyi">
					购买前请阅读“<text @click="xieyiClick">采招网用户协议</text>”与“<text @click="xuzhiClick">购买须知</text>”
				</view>
			</view>
		</view>
		
		<view class="kaitong_foot">
			<view class="kaitong_prices">
				<view class="price_discont">合计<text>¥{{yingfujine}}</text></view>
				<view class="price_all">{{Original==''?'':'原价¥'+Original}}</view>
			</view>
			<view class="kaitong_btn"  @click="requestPayment(paymentItem)">立即开通</view>
		</view>
		<!-- 支付状态弹窗 -->
		<u-popup :show="showPayModal" mode="center" :closeOnClickOverlay="true" @close="close" @open="open"
			width="80%" :closeable="true" border-radius="10">
			<h3 class="pay-popup-tit">支付遇到问题?</h3>
			<view style="padding:5% 10%;">支付完成前，请不要关闭该窗口，完成支付请根据您的情况点击下面的按钮</view>
			<view class="btnWrap">
				<view class="btn btnOver" @click="confirm">已完成支付</view>
				<view class="btn btnRepeat" @click="requestPayment(paymentItem)">重新支付</view>
			</view>
		</u-popup>
		
		<!-- 服务协议弹窗 -->
		<buyNeedknow :showBuyKnow.sync="showBuyKnow"></buyNeedknow>
		
	</view>
</template>

<script>
	import tabControl from '@/components/tabControl-tag/huiyuan-tabControl';
	import buyNeedknow from '@/components/buy-needknow/buy-needknow';
	import commonjs from '@/common/script/common.js';
	var iapChannel;
	export default {
		components: {
			tabControl,
			buyNeedknow
		},
		data() {
			return {
				isShowDelIcon: this.enableDel || false,
				AreaList: ['全国'],
				items: ['移动标准', '移动高级'],
				current: 0,
				Discount: '0.00',
				Original: '0.00',
				selectSpec: 0,
				selectCount: 1,
				isAllow: false,
				DiscountTag: true,
				services: [],
				recommend: [],
				biaozhun: [],
				gaoji: [],
				quanyilists: [{
						qytitle: '招标信息服务',
						qyimg: '/static/img/huiyuan/zhaobiao.png',
						qyimgon: '/static/img/huiyuan/zhaobiao_on.png',
						isAllow: true,
						isAllowgj: true
					},
					{
						qytitle: '政府审批项目',
						qyimg: '/static/img/huiyuan/zhengfu.png',
						qyimgon: '/static/img/huiyuan/zhengfu_on.png',
						isAllow: true,
						isAllowgj: true
					},
					{
						qytitle: '土地挂牌出让',
						qyimg: '/static/img/huiyuan/tudi.png',
						qyimgon: '/static/img/huiyuan/tudi_on.png',
						isAllow: true,
						isAllowgj: true
					},
					{
						qytitle: '售后秘书服务',
						qyimg: '/static/img/huiyuan/shouhou.png',
						qyimgon: '/static/img/huiyuan/shouhou_on.png',
						isAllow: true,
						isAllowgj: true
					},
					{
						qytitle: '招标个性定制',
						qyimg: '/static/img/huiyuan/dingzhi.png',
						qyimgon: '/static/img/huiyuan/dingzhi_on.png',
						isAllow: true,
						isAllowgj: true
					},
					{
						qytitle: '邮件提醒',
						qyimg: '/static/img/huiyuan/youjian.png',
						qyimgon: '/static/img/huiyuan/youjian_on.png',
						isAllow: true,
						isAllowgj: true
					},
					{
						qytitle: '专属人工服务',
						qyimg: '/static/img/huiyuan/kefu.png',
						qyimgon: '/static/img/huiyuan/kefu_on.png',
						isAllow: true,
						isAllowgj: true
					},
					{
						qytitle: '微信信息推送',
						qyimg: '/static/img/huiyuan/tuisong.png',
						qyimgon: '/static/img/huiyuan/tuisong_on.png',
						isAllow: true,
						isAllowgj: true
					},
					{
						qytitle: '拟在建项目',
						qyimg: '/static/img/huiyuan/nizaijian.png',
						qyimgon: '/static/img/huiyuan/nizaijian_on.png',
						isAllow: false,
						isAllowgj: true
					}

				],
				payments: [{
						value: 'wxpay',
						name: '微信支付',
						tupic: "/static/img/huiyuan/weixin.png",
						checked: 'true'
					},
					{
						value: 'alipay',
						tupic: "/static/img/huiyuan/zhifubao.png",
						name: '支付宝支付'
					}
				],
				paymentItem: {
					id: 'wxpay'
				},
				jiageItem: [],
				ordertype: 103, //订单类型
				ordercount: 1, //订单开通会员月份
				ispc: 0, //是否PC端 1是
				isquanguo: 1, //是否全国 1是
				shengcount: 0, //开通省份数量
				dazhe: 10, //10：不打折	
				areacode: '', //地区码
				isshengji: 0, //是否是升级会员 1：是
				danweitype: 2, //单位类型  1、年 2、月
				pcshengji: 0, //pc端升级 1：是
				isfirst: 1, //第一次加载
				pchuiyuan: false, //用户是否为PC会员
				isios: false,
				IAPOrders: [],
				iapnotifycount: 0,
				iosmsg: '请咨询客服人员',
				phone: "400-810-9688",
				yingfujine: 0, //应付金额
				youhuima: '',
				yhqid: 0, //优惠券id
				youhuiquan: [],
				// 支付相关
				showPayModal: false,
				//计划创建的webview
				wv: '',
				// orderid
				orderid: '',
				
				//购买须知
				showBuyKnow:false,
			}
		},
		onLoad(options) {

			// #ifdef APP-PLUS
			this.wv = plus.webview.create("", "bidcenter", {
				// plusrequire: "none", //禁止远程网页使用plus的API，有些使用mui制作的网页可能会监听plus.key，造成关闭页面混乱，可以通过这种方式禁止
				// 'uni-app': 'none', //不加载uni-app渲染层框架，避免样式冲突
				// top: uni.getSystemInfoSync().statusBarHeight +
				// 	44 //放置在titleNView下方。如果还想在webview上方加个地址栏的什么的，可以继续降低TOP值
				top: '50',
				bottom: 0,
				height: 0
			})
			// #endif

			// this.checkLogin(1);
			this.checkLogin(0);
			if (!this.currUser.islogin) {
				uni.navigateTo({
					url: '/pages/user/login/login1?fromurl=/pages/user/huiyuan/payment&type=nav'
				})
				return false;
			};
			// if (this.currUser.user_id == this.baseConfig.testid) {
			// 	uni.redirectTo({
			// 		url: '/pages/user/user'
			// 	})
			// }
			if (uni.getSystemInfoSync().platform == 'ios') {
				this.isios = true;
				if (this.baseConfig.isIOSshenhe) {
					// uni.navigateTo({
					// 	url: '/pages/user/huiyuan/ioszhifu'
					// })
					// uni.redirectTo({
					// 	url: '/pages/user/huiyuan/ioszhifu'
					// });
					// return false;
					this.paymentItem.id = "appleiap";
				}
			}
			var beforePage = '';
			//console.log(options)
			if (options.reurl != undefined && options.reurl != '' && options.reurl != null)
				beforePage = options.reurl;
			if (options.ispc != undefined && options.ispc != '' && options.ispc != null && options.ispc == 1) {
				this.pcshengji = 1;
				this.ispc = 1;
			}
			if (options.diqu != undefined && options.diqu != null && options.diqu != '') {
				this.AreaList = [];
				this.AreaList.push(options.diqu);
				//console.log(options.diqu);
				if (this.isInArray(this.AreaList, '全国')) {
					this.isquanguo = 1;
				} else {
					this.isquanguo = 0;
					this.shengcount = this.AreaList.length;
				}
			}
			if (options.type != undefined && options.type != null && options.type != '') {
				if (options.type == 3 || options.type == 19) {
					this.current = 1;
					if (options.type == 3)
						this.selectCount = 14
				}
				if (options.type == 2 || options.type == 18) {
					this.current = 0;
					if (options.type == 2)
						this.selectCount = 14
				}
			}
			if (options.isshengji != undefined && options.isshengji != '' && options.isshengji != null && options
				.isshengji == 1) {
				this.current = 1;
				this.isshengji = 1;
			}
			this.loadJiage();
			var pages = getCurrentPages();
			var Pagebefore = pages[pages.length - 2];
			//this.checkiaporder();
			this.GetYouhuiquan();
		},
		onShow(options) {
			const me = this;
			// 原因是:页面onshow优先级高于应用onshow
			if(this.isios ){
				setTimeout(function() {
					// 显示支付状态Popup
					// console.log(33)
					if (getApp().globalData.from === 'bidcenter.com.cn://') {
						me.showPayModal = true;
					}
				}, 300)
			}
			
			//this.checkLogin(1);
			this.checkLogin(0);
			if (!this.currUser.islogin) {
				uni.navigateTo({
					url: '/pages/user/login/login1?fromurl=/pages/user/huiyuan/payment&type=nav'
				})
				return false;
			};
			// if (this.currUser.user_id == this.baseConfig.testid) {
			// 	uni.switchTab({
			// 		url: '/pages/user/user'
			// 	})
			// }
			if (uni.getSystemInfoSync().platform == 'ios') {
				this.isios = true;
				if (this.baseConfig.isIOSshenhe) {
					// uni.switchTab({
					// 	url: '/pages/user/user'
					// })
					// return false;
					this.paymentItem.id = "appleiap";
				}
			}
			let pages = getCurrentPages();
			let currPage = pages[pages.length - 1];
			let diqu = currPage.AreaList;
			if (diqu != undefined && diqu.length > 0) {
				this.AreaList = diqu;
				if (this.isInArray(this.AreaList, '全国') || this.AreaList.length > 3) {
					this.isquanguo = 1;
					this.AreaList = ['全国']
				} else {
					this.isquanguo = 0;
					this.shengcount = this.AreaList.length;
				}
			}
			this.getPrice();
		},
		onBackPress(){
			getApp().globalData.from = 'isclose'
		},
		methods: {
			// 已完成支付
			confirm() {
				// 确认支付结果
				this.getPayState();
			},
			open() {
				this.showPayModal = true;
			},
			close() {
				this.showPayModal = false;
				getApp().globalData.from = 'isclose'
			},
			// 获取支付状态
			getPayState() {
				let data = this.initNewData();
				data.location = 5181;
				data.type = "1" // 支付类别	string	Y	0（默认）：二码合一扫码支付 1：直接支付
				data.orderid = this.orderid //
				uni.request({
					url: this.baseConfig.serverURL + '/pay/GetPaySuccessToCecheHandler.ashx', //检查更新的服务器地址
					data: data,
					method: "POST",
					header: {
						"content-type": "application/x-www-form-urlencoded" //"application/json"
					},
					success: (res) => {
						// console.log(22,res)
						if (res.data.ret) {
							this.close()
						} else {
							uni.showToast({
								title: res.data.msg,
								icon: "none"
							});
						}
					},
					fail: (e) => {
						uni.showToast({
							title: '服务器异常',
							icon: "none"
						});
					}
				})
			},

			onNavigationBarButtonTap() {
				uni.navigateTo({
					url: '/pages/user/goumaijilu/goumaijilu'
				})
			},
			radioChange: function(evt) {
				//console.log(evt)
				this.paymentItem.id = evt.target.value;
			},
			yhqradioChange: function(yhid) {
				if (yhid > 0) {
					this.yhqid = yhid;
					this.youhuima = "";
					let curritem = this.youhuiquan.filter(item => {
						return item.id == this.yhqid;
					})
					console.log(curritem)
					if (curritem.length > 0) {
						if (curritem[0].yhType == 0) {
							if (this.Discount > curritem[0].yhJine)
								this.yingfujine = commonjs.subtract(this.Discount, curritem[0].yhJine, 1);
						} else {
							let zhekou = commonjs.multiply(curritem[0].yhZhekou, 0.1, 1);
							this.yingfujine = commonjs.multiply(this.Discount, zhekou, 1);
						}
					}
				} else {
					this.yhqid = 0;
					this.yingfujine = this.Discount;
				}
			},
			addsf() {
				if (this.isshengji == 1) {
					uni.showToast({
						title: "升级会员不能变更省份",
						icon: "none"
					});
				} else {
					let that = this;
					var navData = JSON.stringify(that.AreaList); // 这里转换成 字符串
					uni.navigateTo({
						url: 'diquindex/diquindex?diqu=' + navData
					})
				}
			},
			plusReady() { //uni-app中将此function里的代码放入vue页面的onLoad生命周期中 
				// 获取支付通道 
				let that = this;
				console.log("获取支付通道 ")
				return new Promise((res) => {
					// console.log(1, res)

					// #ifdef APP-PLUS
					plus.payment.getChannels(function(channels) {
						for (var i = 0; i < channels.length; i++) {
							if (channels[i].id == 'appleiap') {
								iapChannel = channels[i];
								//console.log("进入方法appleiap " + that.IAPOrders)
								iapChannel.requestOrder(that.IAPOrders, function(event) {
									uni.hideLoading();
									//console.log(JSON.stringify(event))
								}, function(errormsg) {
									uni.hideLoading();
								});
							}
						}
					}, function(e) {
						uni.showModal({
							content: "获取支付通道失败,请重新进入", //+ e.message,
							showCancel: false,
							success: function() {
								uni.navigateBack({
									delta: 1
								});
							}
						});
						//console.log("获取支付通道失败：" + e.message);
					});
					// #endif

				})
			},

			async pay(e) {
				let that = this;
				uni.showLoading({
					title: '支付中，请稍后'
				});
				plus.payment.request(iapChannel, {
					"productid": e.productid,
					"username": e.username,
					"quantity": e.quantity
				}, function(result) {
					uni.hideLoading();
					if (result != undefined && result != null && result.transactionIdentifier !=
						undefined &&
						result.transactionIdentifier !=
						null && result.transactionReceipt != undefined && result
						.transactionReceipt != null) {
						//添加订单缓存，防止掉单
						uni.setStorageSync("iaporderinfo", result);
						uni.setStorageSync("iaporderinfolocal", e);

						//验证订单
						that.iapnotify(result, e, false);
					} else {
						uni.showToast({
							title: '未获取到订单信息！',
							icon: "none"
						});
					}
				}, function(e) {
					uni.hideLoading();
					uni.showModal({
						content: "下单失败，请重试", //+ JSON.stringify(e),
						showCancel: false
					});
				});
			},
			iapnotify(result, order, ischeck) {
				let that = this;
				let data = this.initNewData();
				data.location = 5181;
				data.orderid = order.orderid;
				//console.log("支付回调方法");
				data.transactionid = result.transactionIdentifier;
				data.receipt = result.transactionReceipt;
				data.payment = JSON.stringify(result.payment);
				uni.request({
					url: this.baseConfig.serverURL +
						'pay/iap/IosiapNotifyHandler.ashx', //检查更新的服务器地址
					data: data,
					method: "POST",
					header: {
						"content-type": "application/x-www-form-urlencoded" //"application/json"
					},
					success: (res) => {
						if (res.statusCode == 200) {
							if (!res.data.ret) {
								uni.showToast({
									title: res.data.msg,
									icon: "none"
								});
							} else {
								//移除订单缓存
								try {
									uni.removeStorage({
										key: 'iaporderinfo',
										success: function(res) {
											//console.log('iaporderinfo remove success');
										}
									});
									uni.removeStorage({
										key: 'iaporderinfolocal',
										success: function(res) {
											//console.log('iaporderinfolocal remove success');
										}
									});
								} catch (e) {}

								if (!ischeck) {
									uni.showToast({
										title: res.data.msg,
										success: function() {
											setTimeout(function() {
												uni.navigateBack({
													delta: 1
												});
											}, 2000)
										}
									})
								}
							}
						} else {
							uni.showToast({
								title: '购买会员失败！',
								icon: "none"
							});
						}
					},
					fail: (e) => {
						that.iapnotifycount++;
						if (that.iapnotifycount < 5) {
							that.iapnotify(result, order, false)
						} else {
							uni.showToast({
								title: '购买会员失败，可能网络超时！',
								icon: "none"
							});
						}

					}
				})

			},
			checkiaporder() { //查询是否存在已支付但是未开通的订单
				if (uni.getStorageSync('iaporderinfo') && uni.getStorageSync('iaporderinfolocal')) {
					//console.log("查询订单");
					this.iapnotify(uni.getStorageSync('iaporderinfo'), uni.getStorageSync(
						'iaporderinfolocal'), true);
				}
			},

			webviewfn(url) {
				// #ifdef APP-PLUS
				// const platform = uni.getSystemInfoSync().platform
				// if (platform === 'ios') {
				this.wv.loadURL(url, {
					Referer: 'bidcenter.com.cn://'
				})
				// } 
				// else {
				// 	wv.loadURL(url, {
				// 		Referer: 'https://bidcenter.com.cn'
				// 	})
				// }

				var currentWebview = this.$scope
					.$getAppWebview(); //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效
				currentWebview.append(this.wv); //一定要append到当前的页面里！！！才能跟随当前页面一起做动画，一起关闭
				// setTimeout(function() {
				// 	console.log(wv.getStyle())
				// }, 1000); //如果是首页的onload调用时需要延时一下，二级页面无需延时，可直接获取
				setTimeout(() => {
					uni.hideLoading()
				}, 6000)

				// 关闭webview
				const me = this;
				// setTimeout(function(){
				// 	plus.webview.close(me.wv);
				// },6000)
				// #endif
			},
			// 点击 立即开通按钮
			async requestPayment(e) {
				const me = this;

				// if (this.isios && this.baseConfig.isIOSshenhe)
				// 	e.id = "appleiap";
				
				let orderInfo = await this.getOrderInfo(e);
				this.orderid = orderInfo.orderid
								
				if ((!this.isios && orderInfo.statusCode !== 200) || (this.isios &&!orderInfo.orderid)) {
					uni.showModal({
						content: "获得订单信息失败",
						showCancel: false
					})
					return;
				}
				
				// && this.baseConfig.isIOSshenhe
				if (this.isios ) {
					// 更新支付弹窗显示条件,重置为应用初始值
					getApp().globalData.from = ''
					
					uni.showLoading({
						title: '订单处理中...'
					});
					// this.pay(orderInfo.data)
					// const h5pay = '/hybrid/html/pay-jsapi.html?orderid=' + orderInfo.orderid+'&token='+this.initNewData().token
					// 注：想唤起微信支付界面时，必须用网络地址；而支付宝及电脑端（只能唤醒微信，打开微信，不能支付）用上面的本地地址也可以
					const h5pay = 'https://m.bidcenter.com.cn/pay/pay-jsapi.html?orderid=' + orderInfo.orderid +
						'&token=' + this.initNewData().token + '&from=open'
					// uni.navigateTo({
					// 	url: '/pages/webView/webView?url=' + h5pay
					// });					
					this.webviewfn(h5pay)
					return
				} else {
					// console.log(66)
					uni.requestPayment({
						provider: e.id,
						orderInfo: orderInfo.data,
						success: (e) => {
							//console.log("success", e);
							uni.showToast({
								title: "开通成功!",
								success: function() {
									setTimeout(function() {
										uni.navigateBack({
											delta: 1
										});
									}, 2000)
								}
							})
						},
						fail: (e) => {
							console.log("fail", e);
							uni.showModal({
								content: "支付失败",
								showCancel: false
							})
						},
						complete: () => {
							// this.providerList[index].loading = false;
						}
					})
				}
			},

			getOrderInfo(e) {
				//console.log(e);
				let data = this.initNewData();
				data.location = 5181;
				// yyb huawei xiaomi oppo

				data.qudao = getApp().globalData.channel;
				
				if(!this.isios){
					let appid = "";
					// #ifdef APP-PLUS
					appid = plus.runtime.appid;
					// #endif
					data.appid = appid;
					data.payid = e.id;
					data.dazhe = this.dazhe;
					data.orderid = 0;
				}else{
					data.zo_typebs = 1; // 权限标识	int	Y 0：功能服务；1：会员服务
					// data.type2=''; // 子账号类型	int	N	购买“PC端会员+子账户”时生效 30：标准子账户 31：高级子账户 32 VIP子账户
					// zo_count:''
					data.ipay = this.paymentItem.id // 支付平台	string	Y	wxpay：微信支付，alipay：支付宝支付，weworkpay：企业微信
					data.key = '' // 购买信息唯一标识	string	Y	例：购买企业报告下载权限时，企业名称唯一标识
					data.key2 = '' // 购买信息部分模块标识	string	Y	购买企业报告部分模块下载权限时，模块分类id串
					//console.log(data);
				}
				
				data.type = this.ordertype;
				data.count = this.ordercount;
				data.ispc = this.ispc;
				data.danweitype = this.danweitype;
				data.isquanguo = this.isquanguo;

				if (this.isquanguo == 1) {
					this.areacode = '';
				} else {
					var code = '';
					for (var i = 0; i < this.AreaList.length; i++) {
						code += commonjs.getAreaCode(this.AreaList[i]) + ","
					}
					this.areacode = code;
				}
				data.shengcount = this.shengcount;
				data.areacode = this.areacode;
				data.isshengji = this.isshengji;
				data.area = this.AreaList.toString();
				// data.dazhe = this.dazhe;
				// data.orderid = 0;
				data.yhqid = this.yhqid;
				data.youhuima = this.youhuima;

				data.zo_typebs = 1; // 权限标识	int	Y 0：功能服务；1：会员服务
				// data.type2=''; // 子账号类型	int	N	购买“PC端会员+子账户”时生效 30：标准子账户 31：高级子账户 32 VIP子账户
				// zo_count:''
				data.ipay = this.paymentItem.id // 支付平台	string	Y	wxpay：微信支付，alipay：支付宝支付，weworkpay：企业微信
				data.key = '' // 购买信息唯一标识	string	Y	例：购买企业报告下载权限时，企业名称唯一标识
				data.key2 = '' // 购买信息部分模块标识	string	Y	购买企业报告部分模块下载权限时，模块分类id串
				//console.log(data);
				const url = this.isios ? '/payStep/CreateOrderHandler.ashx' : '/pay/CreateOrderHandler.ashx'
				return new Promise((res) => {
					// payStep/CreateOrderHandler.ashx
					// pay/CreateOrderHandler.ashx
					uni.request({
						url: this.baseConfig.serverURL + url, //检查更新的服务器地址
						data: data,
						method: "POST",
						header: {
							"content-type": "application/x-www-form-urlencoded" //"application/json"
						},
						success: (result) => {
							// console.log(55,result)
							if (result.statusCode == 200) {
								if (!result.data.ret) {
									uni.showToast({
										title: result.data.msg,
										icon: "none"
									});
								} else {
									res(result.data.other2);
								}
							} else {
								uni.showToast({
									title: result.data.msg,
									icon: "none"
								});
							}
						},
						fail: (e) => {
							uni.showToast({
								title: '创建订单失败！',
								icon: "none"
							});
						}
					})
				})
			},
			setSelectSpec(e) {
				//console.log(e)
				if (this.isshengji == 1 && this.pcshengji == 1 && this.isfirst > 1) {
					uni.showToast({
						title: "PC端会员升级不能变更服务周期",
						icon: "none"
					});
				} else {
					this.isfirst++;
					this.Discount = e.Discount;
					this.yingfujine = e.Discount;
					this.Original = e.Original;
					this.ordercount = e.count;
					this.selectCount = e.currcount;
					this.dazhe = e.zhekou;
					this.danweitype = e.danweitype;
					//console.log(e);
					if (this.current == 0) {
						if (e.currcount < 13) {
							this.ispc = 0; //是否PC端 1是

							if (this.isInArray(this.AreaList, '全国') || this.AreaList.length > 3) {
								this.isquanguo = 1;
								this.AreaList = ['全国']
							} else {
								this.isquanguo = 0;
								this.shengcount = this.AreaList.length;
							}
							this.ordertype = 103; //移动标准
						} else {
							//console.log(e.currcount)
							this.ispc = e.currcount == 14 ? 1 : 0; //是否PC端 1是
							this.ordertype = e.currcount == 14 ? 2 : 103; //pc标准
							this.isquanguo = 1;
						}

					} else {
						if (e.currcount < 13) {
							this.ordertype = 104; //移动高级
							this.ispc = 0; //是否PC端 1是
							if (this.isInArray(this.AreaList, '全国') || this.AreaList.length > 3) {
								this.isquanguo = 1;
								this.AreaList = ['全国']
							} else {
								this.isquanguo = 0;
								this.shengcount = this.AreaList.length;
							}
						} else {
							this.ispc = e.currcount == 14 ? 1 : 0; //是否PC端 1是
							this.ordertype = e.currcount == 14 ? 3 : 104; //pc高级
							this.isquanguo = 1;
						}
					}
					this.$refs.yhqlistitem.check(this.Discount, this.isquanguo, this.ordertype, this
						.ordercount, this
						.danweitype);
					if (this.youhuima.length > 0)
						this.CheckYaoqingma();
				}
			},
			onClickItem(val) {
				this.current = val.currentIndex;
				this.getPrice();
			},
			loadJiage() {
				//异步请求数据
				let data = this.initNewData();
				data.location = 1;
				data.payid = this.paymentItem.id;
				if (data.system == undefined || data.system == null || data.system == '' || data
					.system == 'null') {
					var t2 = setInterval(function() {
						data.system = uni.getSystemInfoSync().platform;
						if (data.system != undefined && data.system != '' && data.system !=
							'null' && data
							.system != null) {
							clearInterval(t2);
						}
					}, 50);
				}
				uni.request({
					url: this.baseConfig.serverURL +
						'pay/LiJiKaiTongHandler.ashx', //检查更新的服务器地址
					data: data,
					method: "POST",
					header: {
						"content-type": "application/x-www-form-urlencoded" //"application/json"
					},
					success: (res) => {
						if (res.statusCode == 200) {
							//console.log(res);
							if (!res.data.ret) {
								uni.showToast({
									title: res.data.msg,
									icon: "none"
								});
							} else {
								//获取成功，绑定
								let list = res.data.other2.jiage.ds;
								this.pchuiyuan = res.data.other2.ispc;
								// if (res.data.other2.biaozhun != null)
								// 	this.biaozhun.push(res.data.other2.biaozhun);
								// if (res.data.other2.gaoji != null)
								// 	this.gaoji.push(res.data.other2.gaoji);
								this.jiageItem = list;
								this.IAPOrders = res.data.other2.IAPOrders;
								//this.IAPOrders = Array.from(new Set(this.IAPOrders));
								// this.IAPOrders = this.IAPOrders.filter(function(item, index) {
								// 	return this.IAPOrders.indexOf(item, 0) === index;
								// });
								// if (this.isios && this.pchuiyuan) {
								// 	uni.showModal({
								// 		content: "您已经是PC端会员，无需开通",
								// 		showCancel: false,
								// 		success: function() {
								// 			uni.navigateBack({
								// 				delta: 1
								// 			});
								// 		}
								// 	});
								// }
								//console.log(this.IAPOrders)
								this.getPrice();
								// console.log('channels条件',this.baseConfig.isIOSshenhe,this.isios)
								if (this.isios && this.baseConfig.isIOSshenhe) {
									this.plusReady()
								}

								//this.jiageChange();
							}
						} else {
							uni.showToast({
								title: '获取价格信息失败',
								icon: "none"
							});
						}
					},
					fail: (res) => {
						uni.showToast({
							title: '获取价格信息失败！',
							icon: "none"
						});
					}
				})
			},
			getPrice() {
				var item = new Object();
				var danwei = (this.ordertype == 2 || this.ordertype == 3) ? 1 : 2;
				var type = this.current == 0 ? 103 : 104;
				var quanguo = this.isquanguo == 1 ? 1 : 2;
				this.services = [];
				this.recommend = [];
				var pctype = this.current == 0 ? 2 : 3;
				for (var i = 0; i < this.jiageItem.length; i++) {
					if (this.jiageItem[i].type == type && this.jiageItem[i].danwei == 2 && this
						.jiageItem[i].biaoshi ==
						quanguo) {
						//console.log("this.jiageItem[i].type:"+this.jiageItem[i].type+"this.jiageItem[i].danwei"+this.jiageItem[i].danwei+"this.jiageItem[i].biaoshi"+this.jiageItem[i].biaoshi)
						var item = new Object();
						item.Month = this.jiageItem[i].danweinum + '个月';
						item.renshu = '';
						item.Discount = quanguo == 2 ? this.mul(this.jiageItem[i].price, this
							.shengcount) : this.jiageItem[
							i].price;
						item.Original = (this.jiageItem[i].zhekou < 10) ? (quanguo == 2 ? this.mul(this
								.jiageItem[i]
								.yuanjia, this.shengcount) :
							this.jiageItem[i].yuanjia) : '';
						item.DiscountTag = (this.jiageItem[i].zhekou < 10) ? '' : 'discount_icon';
						item.Fold = (this.jiageItem[i].zhekou < 10) ? this.jiageItem[i].zhekou + '折' :
							'';
						item.count = this.jiageItem[i].danweinum;
						item.currcount = this.jiageItem[i].danweinum;
						item.zhekou = this.jiageItem[i].zhekou;
						item.danweitype = this.jiageItem[i].danwei; //单位类型  1、年 2、月
						this.services.push(item);
					}

					if (this.jiageItem[i].type == type && this.jiageItem[i].danwei == 1 && this
						.jiageItem[i].biaoshi ==
						1 && this.jiageItem[
							i].danweinum == 1) {
						var item = new Object();
						item.Month = '全国年费直通车';
						if (this.current == 0)
							item.renshu = '(移动标准会员)';
						else
							item.renshu = '(移动高级会员)';
						item.Discount = this.jiageItem[i].price;
						item.Original = (this.jiageItem[i].zhekou < 10) ? this.jiageItem[i].yuanjia :
							'';
						item.DiscountTag = '';
						item.Fold = (this.jiageItem[i].zhekou < 10) ? this.jiageItem[i].zhekou + '折' :
							'';
						item.count = this.jiageItem[i].danweinum;
						item.currcount = 13;
						item.zhekou = this.jiageItem[i].zhekou;
						item.danweitype = this.jiageItem[i].danwei; //单位类型  1、年 2、月
						this.recommend.push(item);
					}
					if (this.jiageItem[i].type == pctype && this.jiageItem[i].danwei == 1 && this
						.jiageItem[i].biaoshi ==
						1 && this.jiageItem[
							i].danweinum == 1) {
						var item = new Object();
						item.Month = pctype == 2 ? '全国PC端标准会员' : '全国PC端高级会员';
						item.renshu = '';
						item.Discount = this.jiageItem[i].price;
						item.Original = '';
						item.DiscountTag = '';
						item.Fold = '推荐';
						item.count = this.jiageItem[i].danweinum;
						item.currcount = 14;
						item.zhekou = this.jiageItem[i].zhekou;
						item.danweitype = this.jiageItem[i].danwei; //单位类型  1、年 2、月
						this.recommend.push(item);
					}
				}
				if (this.pchuiyuan) {
					this.selectCount = 14;
					this.recommend = this.recommend.filter(item => {
						return item.currcount == 14;
					})
				}
				this.jiageChange();
			},
			//浮点数相乘
			mul(arg1, arg2) {
				var m = 0,
					s1 = arg1.toString(),
					s2 = arg2.toString();
				try {
					m += s1.split(".")[1].length
				} catch (e) {}
				try {
					m += s2.split(".")[1].length
				} catch (e) {}
				return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
			},
			jiageChange() {
				var arrFuwu = [];
				//console.log(this.selectCount);
				if (this.selectCount < 13) {
					arrFuwu = this.services;
				} else {
					arrFuwu = this.recommend;
				}
				for (let arr = 0; arr < arrFuwu.length; arr++) {
					var m = arrFuwu[arr];
					if (m.currcount == this.selectCount) {

						this.setSelectSpec(m, arr);
					}
				}
			},

			delTag: function(e) {
				if (this.isshengji == 1) {
					uni.showToast({
						title: "升级会员不能变更省份",
						icon: "none"
					});
				} else {
					let delTagText = e.currentTarget.dataset.text
					let delTagIndex = this.AreaList.indexOf(delTagText)
					this.AreaList.splice(delTagIndex, 1)
					this.$emit("delete", {
						currentTag: delTagText,
						allTags: this.AreaList
					})
					//console.log(this.AreaList);
					this.shengcount = this.AreaList.length;
					if (this.AreaList.length == 0) {
						this.AreaList = ['全国'];
						this.isquanguo = 1;
					}
					this.getPrice();
				}
			},
			tapTag: function(e) {
				let selTagText = e.currentTarget.dataset.text
				this.$emit("click", selTagText)
			},
			isInArray(arr, value) {
				for (var i = 0; i < arr.length; i++) {
					if (value === arr[i]) {
						return true;
					}
				}
				return false;
			},
			callPhone(tel) {
				uni.makePhoneCall({
					phoneNumber: tel
				});
			},
			tiaozhuan() {
				uni.redirectTo({
					url: 'ioszhifu'
				})
			},
			GetYouhuiquan() {
				//异步请求数据
				let data = this.initNewData();
				data.location = 1;
				uni.request({
					url: this.baseConfig.serverURL +
						'User/youhui/YouhuiquanListHandler.ashx', //检查更新的服务器地址
					data: data,
					method: "POST",
					header: {
						"content-type": "application/x-www-form-urlencoded" //"application/json"
					},
					success: (res) => {
						if (res.statusCode == 200) {
							console.log('youhuiquan', res);
							if (res.data.ret) {
								//获取成功，绑定
								let list = res.data.other2.youhuiquan;
								if (list)
									this.youhuiquan = list;
								console.log(this.youhuiquan)
							}
						}
					},
					fail: (res) => {

					}
				})
			},
			CheckYaoqingma() {
				//异步请求数据
				let data = this.initNewData();
				data.location = 1;
				data.youhuima = this.youhuima;
				data.jine = this.Discount;

				data.type = this.ordertype;
				data.count = this.ordercount;
				data.ispc = this.ispc;
				data.danweitype = this.danweitype;
				data.isquanguo = this.isquanguo;
				data.isshengji = this.isshengji;
				data.yhqid = this.yhqid;

				uni.request({
					url: this.baseConfig.serverURL +
						'User/youhui/TuiguangmaCheckHandler.ashx', //检查更新的服务器地址
					data: data,
					method: "POST",
					header: {
						"content-type": "application/x-www-form-urlencoded" //"application/json"
					},
					success: (res) => {
						if (res.statusCode == 200) {
							console.log('yaoqingma', res);
							if (res.data.ret) {
								//获取成功，绑定
								let yhjine = res.data.other2.yhjine;
								if (yhjine && yhjine > 0) {
									if (this.Discount > yhjine)
										this.yingfujine = commonjs.subtract(this.Discount,
											yhjine, 1);
								} else
									uni.showToast({
										title: res.data.msg,
										icon: "none"
									});
							} else
								this.yingfujine = this.Discount;
						} else
							this.yingfujine = this.Discount;
					},
					fail: (res) => {
						this.yingfujine = this.Discount;
					}
				})
			},
			//用户协议
			xieyiClick(){
				var url  = 'https://www.bidcenter.com.cn/help/fwtk.shtml'
				uni.navigateTo({
					url:'/pages/user/yinsitiaokuan/yinsitiaokuan?url=' + url
				})
			},
			// 购买须知
			xuzhiClick(){
				this.showBuyKnow=true
			},
			
		}
	}
</script>

<style lang="scss">
	page {
		height: 100%;
		background-color: #e3e3e3;
	}

	.hy_tabbar {
		margin: 30rpx;
		background-color: #f4f6f8;
		border-radius: 100rpx;
		display: flex;
		flex-direction: row;
		align-items: center;

		.tabbar_cell {
			width: 50%;
			text-align: center;
			font-size: 32rpx;
			color: #2660cd;
			padding: 25rpx 0;
			border-radius: 100rpx;
		}

		.active {
			background-color: #2660cd;
			color: #fff;
		}
	}

	.bzhy_adv {
		margin: 0 30rpx 30rpx;
		height: 350rpx;
		background-color: #2660cd;
		border-radius: 20rpx;
		position: relative;
		z-index: -1;
		overflow: hidden;

		.bzhy_bg {
			background: url(/static/img/huiyuan/huiyuan_03.png) no-repeat;
			background-size: 100% 100%;
			width: 182rpx;
			height: 168rpx;
			position: absolute;
			left: 0;
			bottom: 0;
			z-index: -1;
		}

		.gaoji_bgtop {
			background: url(/static/img/huiyuan/gaojibg.png) no-repeat;
			background-size: 100% 100%;
			width: 105rpx;
			height: 97rpx;
			position: absolute;
			left: 0;
			top: 0;
			z-index: -1;
		}

		.gaoji_bgbottom {
			background: url(/static/img/huiyuan/gaojibg.png) no-repeat;
			background-size: 100% 100%;
			width: 105rpx;
			height: 97rpx;
			position: absolute;
			right: 0;
			bottom: 0;
			z-index: -1;
			transform: rotate(180deg);
		}

		.bzhy_ktrs {
			text-align: center;
			font-size: 30rpx;
			color: #fff;
			font-weight: 700;
			padding-top: 40rpx;
		}

		.color-yellow {
			color: #ffe75e;
		}

		.bzhy_biaoyu {
			font-size: 36rpx;
			font-weight: 700;
			text-align: center;
			color: #fff;
			margin: 40rpx 0;
		}

		.bzhy_ljkt {
			width: 60%;
			margin: 0 auto;
			background-image: linear-gradient(to bottom, #f38e2f, #feb32b);
			padding: 25rpx 0;
			border-radius: 50rpx;
			color: #fff;
			text-align: center;
			font-size: 32rpx;
			font-weight: 700;
		}
	}

	.bzhy_badge {
		position: absolute;
		right: 0;
		top: 0;
		background-image: linear-gradient(#fbaa2c, #f7992e);
		color: #fff;
		font-weight: 700;
		padding: 10rpx 20rpx;
		font-size: 30rpx;
		border-top-right-radius: 20rpx;
		border-bottom-left-radius: 20rpx;
	}

	.huiyuan_xinxi {
		display: flex;
		flex-direction: row;
		margin: 40rpx;

		.huiyuan_toux {
			width: 158rpx;
			height: 158rpx;
			border-radius: 100%;
		}

		.huiyuan_lxfs {
			flex: 1 1 0%;
			margin-left: 20rpx;
			color: #fff;
			font-size: 30rpx;

			.lxfs_tel {
				line-height: 3;
				font-weight: 700;
			}

			.tianshu {
				font-weight: 700;
				margin-left: 10rpx;
			}
		}
	}

	.huiyuan_kahao {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;

		.kahao_num {
			font-weight: 700;
			font-size: 30rpx;
			color: #fff;
		}

		.lijixufei {
			background-image: linear-gradient(#fbaa2c, #f7992e);
			color: #fff;
			font-size: 28rpx;
			padding: 0rpx 30rpx;
			border-radius: 66rpx;
			height: 66rpx;
			line-height: 66rpx;
			margin-left: 40rpx;
		}
	}

	.huiyuan-wrapper {
		//margin-top: 15rpx;
	}

	.infor_quanyi {
		margin-top: 15rpx;
		background-color: #FFFFFF;

		.quanyi_title {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			margin: 0 30rpx;
			padding-top: 30rpx;

			.section-head-line {
				width: 8rpx;
				height: 35rpx;
				background-color: #2d67e0;
				border-radius: 5rpx;
				margin-right: 15rpx;
			}

			.quanyi_titleL {
				display: flex;
				align-items: center;
				font-size: 32rpx;
			}

			.quanyi_titleR {
				color: #5e5b5c;
				font-size: 28rpx;
			}
		}
	}

	.quanyi_cells {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		margin: 30rpx 30rpx 0;

		.quanyi_cell_list {
			display: flex;
			flex-direction: column;
			margin-bottom: 30rpx;
			width: 25%;

			.defult-img {
				width: 100rpx;
				height: 100rpx;
				margin: 0 auto 10rpx;
			}

			.img-on {
				display: none;
			}

			text {
				font-size: 24rpx;
				text-align: center;
			}
		}

		.quanyi_cell_list_on {
			display: flex;
			flex-direction: column;
			margin-bottom: 30rpx;
			width: 25%;

			.img-on {
				width: 100rpx;
				height: 100rpx;
				margin: 0 auto 10rpx;
				display: block;
			}

			.defult-img {
				display: none;
			}

			text {
				font-size: 24rpx;
				text-align: center;
			}
		}
	}

	.quanyi2 {
		padding-bottom: 100rpx;
	}

	.xinxi_cell_list {
		border: 1px solid #6fbcff;
		border-radius: 10rpx;
		padding: 30rpx 25rpx;
		display: flex;
		flex-direction: column;
		width: 28%;
		box-sizing: border-box;
		margin-left: 30rpx;
		background-color: #fcfbf7;

		image {
			height: 96rpx;
			margin: 0 auto 10rpx;
		}

		text {
			color: #2660cd;
			font-size: 28rpx;
			text-align: center;
		}
	}

	.kaitong_foot {
		position: fixed;
		bottom: 0;
		z-index: 999;
		background-color: #fff;
		color: #fff;
		font-size: 34rpx;
		text-align: center;
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;

		.kaitong_prices {
			width: 40%;

			.price_discont {
				color: #757575;

				text {
					color: #f36564;
				}
			}

			.price_all {
				color: #bcbcbc;
				font-size: 30rpx;
				text-decoration: line-through;
			}
		}

		.kaitong_btn {
			flex: 1 1 0%;
			background-color: #f36564;
			color: #fff;
			padding: 30rpx 0 30rpx;
		}
	}

	.ywfw_cells {
		margin: 30rpx 0 0;
		display: flex;
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
		border-bottom: 1px solid #e3e3e3;
		padding: 0 30rpx 30rpx;

		.ywfw_area {
			width: 18%;
			border-radius: 10rpx;
			text-align: center;
			padding: 0 15rpx;
			font-size: 30rpx;
			color: #666666;
			border: 1px solid #e3e3e3;
			position: relative;
			height: 70rpx;
			line-height: 70rpx;
			margin: 0 10rpx 10rpx;
		}

		.add-sf {
			background-color: #e4f2fb;
			color: #3f85fe;
			border-color: #e4f2fb;
		}

		.ywfw_area_clear {
			width: 36rpx;
			height: 35rpx;
			vertical-align: middle;
			margin-left: 40rpx;
		}

		.area_selected {
			border: 1px solid #2e68e1;
			color: #2e68e1;
		}
	}

	.fwzq_cells {
		margin-top: 50rpx;
		margin-right: 30rpx;
		margin-left: 30rpx;
		display: flex;

		.fwzq_cell_list {
			flex: 1 1 0%;
			justify-content: center;
			background-color: #ffefed;
			border-radius: 10rpx;
			border: 5rpx solid #ffefed;
			box-sizing: border-box;
			padding: 10rpx 10rpx 20rpx;
			text-align: center;
			position: relative;
			margin: 0 10rpx 40rpx;

			.fwzq_text1 {
				font-size: 32rpx;
				padding: 20rpx 0;
				text-align: center;
			}

			.fwzq_jiage {
				font-size: 30rpx;

				text {
					color: #fc6550;
					font-weight: 700;
					font-size: 36rpx;
				}
			}

			.fwzq_jiage_fuben {
				color: #b3b3b3;
				font-size: 28rpx;
				text-decoration: line-through;
				text-align: center;
				padding-top: 20rpx;
			}

			.discount_icon2 {
				display: none;
			}

			.discount_icon {
				position: absolute;
				right: -2px;
				top: -30rpx;
				padding: 0 20rpx;
				height: 46rpx;
				line-height: 46rpx;
				font-size: 24rpx;
				text-align: center;
				color: #FFFFFF;
				background-color: #ee344a;
				border-radius: 20px;
				border-bottom-right-radius: 0;
				border-top-right-radius: 10px;
			}
		}

		.fwzq_list_selected {
			border: 5rpx solid #fc6550;
			background-color: #fff;
		}
	}

	.tequantishi {
		margin-top: 20rpx;
		margin-left: 30rpx;
		font-size: 30rpx;
		color: #909090;

		image {
			width: 36rpx;
			height: 32rpx;
			vertical-align: middle;
			margin-right: 10rpx;
		}
	}

	.tequantishi_text {
		margin-left: 30rpx;
		font-size: 28rpx;
		color: #909090;
		margin-top: 20rpx;
	}

	.payment {
		display: flex;
		flex-direction: column;
		padding: 30rpx 0;
		border-top: 1px solid #e3e3e3;
		margin-top: 30rpx;

		.payment_radio {
			flex-direction: column;
			display: flex;
			margin: 0 15px;

			.pay-list-cell {
				flex-direction: row;
				display: flex;
				align-items: center;
				justify-content: space-between;
				width: 100%;
				font-size: 32rpx;
				margin-bottom: 30rpx;
				border-bottom: 1px solid #F5F5F5;
				padding-bottom: 30rpx;
			}
		}

		.pay-tupic {
			width: 55rpx;
			height: 54rpx;
			vertical-align: middle;
			margin-right: 20rpx;
		}

	}

	.recommend_pay {
		padding-top: 0;

		.fwqx_title {
			font-size: 30rpx;
			padding-top: 20rpx;
		}
	}

	.tagContainer {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	.tagItem {
		width: auto;
		height: 70rpx;
		line-height: 70rpx;
		margin: 0 10rpx 10rpx;
		border-radius: 10rpx;
		color: white;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 0 20rpx;
	}

	.tagDelIcon {
		margin-left: 20rpx;
	}

	.tagBgDefault {
		background-color: #3b8bfe;
		color: #fff;
		font-size: 30rpx;
	}

	.payment .payment_radio .pay-list-cell:last-child {
		border-bottom: 0;
		margin-bottom: 0;
		padding-bottom: 0;
	}

	// .tequan-box {
		// padding-bottom: 125rpx;
	// }
	

	// .youhuiquan-box {
	// 	margin: 30rpx 30rpx 0;
	// 	padding-bottom: 30rpx;
	// }

	// .youhuiquan-box .youhuiquan-list {
	// 	display: flex;
	// 	align-items: center;
	// 	margin-bottom: 20rpx;
	// 	color: #898989;
	// 	justify-content: space-between;
	// 	background: url(/static/img/youhuiquan_bg1.png) no-repeat;
	// 	height: 138rpx;
	// 	background-size: contain;
	// }

	// .youhuiquan-box .youhuiquan-list .youhuiquan-box-left {
	// 	width: 160rpx;
	// 	display: flex;
	// 	flex-direction: column;
	// 	align-items: center;
	// 	justify-content: center;
	// }

	// .youhuiquan-price {
	// 	font-size: 45rpx;
	// }

	// .youhuiquan-qixian {
	// 	font-size: 24rpx;
	// }

	// .youhuiquan-box .youhuiquan-list .youhuiquan-box-body {
	// 	margin-left: 35rpx;
	// 	flex: 1;
	// }

	// .youhuiquan-box-body .youhuiquan-name {
	// 	color: #282828;
	// 	font-size: 30rpx;
	// }

	// .youhuiquan-box-body .youhuiquan-youxiaoqi {
	// 	color: #5f5f5f;
	// 	font-size: 20rpx;
	// }

	// .youhuiquan-box .youhuiquan-list .youhuiquan-box-right {
	// 	margin-right: 30rpx;
	// }

	// .fwzq-view-cell .youhuiquan-list .zhitongcheL {
	// 	margin-left: 30rpx;
	// 	margin-top: 15rpx;
	// }

	// .youhuiquan-box .active {
	// 	background: url(/static/img/youhuiquan_bg2.png) no-repeat;
	// 	height: 138rpx;
	// 	background-size: contain;
	// }

	// .youhuiquan-box .active .youhuiquan-box-left {
	// 	color: #ff1440;
	// }
</style>
<style lang="scss" scoped>
	.btnWrap {
		display: flex;
		justify-content: center;
		padding-bottom: 50rpx;

		.btn {
			background-color: #f4f5f7;
			padding: 2% 5%;
			color: #868789;
			border-radius: 7rpx;

			&:first-child {
				background-color: #304aff;
				margin-right: 8%;
				color: #fff;

			}
		}
	}

	.pay-popup-tit {
		padding: 21px 0 0px;
		text-align: center;
	}
	.fuwuxieyi{
		padding:20rpx 30rpx;
		font-size: 28rpx;
		color: #333;
		text{
			color: #2e68e1;
		}
	}
</style>